<%@page language="java"
%><%@page import="com.googlecode.bip.xml.export.XMLSurveyFactory"
%><%
    String uri = request.getRequestURI().toLowerCase();
    String encoding = "ISO-8859-1";
    String contentType;
    
    if( uri.endsWith( ".html" ) ) {
        contentType = "text/html; charset=" + encoding;
        }
    else if( uri.endsWith( ".txt" ) ) {
        contentType="text/plain; charset=" + encoding;
        }
    else if( uri.endsWith( ".xml" ) ) {
        contentType="text/download; charset=" + encoding;
        }
    else {
        contentType = "text/xml; charset=" + encoding;
       }
    response.setContentType( contentType );
    response.setCharacterEncoding( encoding );
    
    //System.out.println( "uri = " + uri );
    //System.out.println( "contentType = " + contentType );

    XMLSurveyFactory.exportXML( out, encoding );
%>
